<template>
	<view>
		<view class="smart-container">1.容器</view>
		<view class="smart-panel-title" @click="goDetailPage('view')"><text>view视图</text></view>
		<view class="smart-panel-h" @click="goDetailPage('scroll-view')"><text>scroll-view滚动视图</text></view>
		<view class="smart-panel-h" @click="goDetailPage('swiper')"><text>swiper可滑动视图</text></view>
		<view class="smart-container">2.基本内容</view>
		<view class="smart-panel-h" @click="goDetailPage('text')"><text>text文本编辑</text></view>
		<view class="smart-panel-h" @click="goDetailPage('icon')"><text>icon图标</text></view>
		<view class="smart-container">3.表单组件</view>
		<view class="smart-panel-h" @click="goDetailPage('button')"><text>button按钮</text></view>
		<view class="smart-panel-h" @click="goDetailPage('checkbox')"><text>checkbox多选项</text></view>
		<view class="smart-panel-h" @click="goDetailPage('label')"><text>label标签组件</text></view>
		<view class="smart-panel-h" @click="goDetailPage('input')"><text>input输入框</text></view>
		<view class="smart-panel-h" @click="goDetailPage('textarea')"><text>textarea多行文本输入框</text></view>
		<view class="smart-panel-h" @click="goDetailPage('form')"><text>form表单</text></view>
		<view class="smart-container">4.导航组件</view>
		<view class="smart-panel-h" @click="goDetailPage('navigator')"><text>navigator</text></view>
		<view class="smart-container">5.自定义组件</view>
		<navigator class="smart-panel-h" url="/pages/cardViewPage/cardViewPage">新闻置顶</navigator>
		<navigator class="smart-panel-h" url="/pages/NewCardPage/NewCardPage">新闻列表</navigator>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onshow(){
			console.log("组件页onshow");
			uni.getStorage({
				key:'Account',
				success(result){
					console.log("获取字段成功"+JSON.stringify(result));
					this.account=result.data;
				},fail(errMsg){
					// [object object]
					console.log("获取字段失败"+JSON.stringify(errMsg));
				}
			})
		},
		methods: {
			goDetailPage(e) {
							if (typeof e === 'string') {
								uni.navigateTo({
									url: '/pages/components/' + e + '/' + e
								});
							} else {
								uni.navigateTo({
									url: e.url
								});
							}
						}
		}
	}
</script>

<style>

</style>
